<!DOCTYPE html>
<html>
<head>
  <title>Example - Hello</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

  <!-- Replace with a separate style.css file if you want -->
  <style type="text/css">
  body {
    background: black;
    color: white;
  }
  </style>

  <!-- These 2 script tags are required for the 3D effect.
       You can remove these if you disabled THREE_SETTINGS. -->
  <script async src="https://unpkg.com/es-module-shims@1.8.0/dist/es-module-shims.js"></script>
  <script type="importmap">
    {
      "imports": {
        "three": "./three-0.156.1/three.module.min.js",
        "three/addons/": "./three-0.156.1/addons/"
      }
    }
  </script>

  <script type="module">
    import * as qx from "./qx82/qx.js";
    import * as qxa from "./qx82/qxa.js";

    async function main() {
      // Clear screen using white foreground (7) over blue background (1).
      qx.color(7, 1);
      qx.cls();
      // Print greeting at position 1,1.
      qx.locate(1, 1);
      qx.print("Hello world!\n\n");
      // Ask the user's name.
      qx.print("What is your name?\n> ");
      // Don't forget: qxa.* functions need to be called with await:
      const name = await qxa.readLine();
      // Print it back, but in yellow (14).
      qx.color(14);
      qx.print("\n\nHi, " + name + ".");
    }

    window.addEventListener("load", () => qx.init(main));
  </script>
</head>
<body>
</body>
</html>
